/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __MSG_NET_NET_TCP_H__
#define __MSG_NET_NET_TCP_H__

namespace xos_net
{

    class connection;

    class net_tcp
    {
    public:
        net_tcp();
        ~net_tcp();

    protected:
        int on_init( xos_box::i_msg *& pMsg );
        int on_connect( xos_box::i_msg *& pMsg );
        int on_accept( xos_box::i_msg *& pMsg );
        int on_recv( xos_box::i_msg *& pMsg );
        int on_send( xos_box::i_msg *& pMsg );
        int on_shutdown( xos_box::i_msg *& pMsg );
        int on_close( xos_box::i_msg *& pMsg );

    public:
        int proc( xos_box::i_msg *& pMsg );

    };

} // xos_net

#endif // __MSG_NET_NET_TCP_H__
